﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 学生信息管理系统
{
    class student
    {
        
        
      
        public static void Retype(string info)
        {         
                Console.WriteLine("输入错误请重新输入");
                info = Console.ReadLine();           
        }
        //判断首界面退出和登陆 
       public static void ScoreSystemLogin(string Info)
        {
            switch (Info)
            {
                case "1":
                    Console.Clear();
                    surface_chart.AccounPasswordTitle();
                    
                    break;
                case "2":
                    break;
                default:                    
                    Console.Clear();
                    Console.WriteLine("输入错误请重新输入");
                    surface_chart.ScoreSystemTitle();
                    break;
            }
        }
        //判断账号密码是否正确 不正确则进入界面2
        public static void JudgeAccountPassword(string Id,string Code)
        {
            
            if (Id=="admin" && Code=="888888")
            {
                surface_chart.SceneSelectionMenu();
            }
            else if (Id=="admin")
            {
                Console.Clear();
                Console.WriteLine("密码错误请重新输入");
                surface_chart.AccounPasswordTitle();

            }
            else
            {
                Console.Clear();
                Console.WriteLine("账号或者密码输入错误请重新输入");
                surface_chart.AccounPasswordTitle();
            }
           
           
        }
        //判断界面按1查询按2修改按3录入按4录入
        public static void JudgeSceneMenu(string info)
        {           
                switch (info)
                {
                    case "1":
                        surface_chart.BasicInfo();
                        break;
                    case "2":
                        surface_chart.BasicInfoModify();
                        break;
                    case "3":
                        surface_chart.BasicInfoInput();
                        break;
                    case "4":
                        surface_chart.CourseScoresInput();
                        break;
                
                default:
                        Console.WriteLine("输入错误请重新输入");
                    string info2 = Console.ReadLine();
                        JudgeSceneMenu(info2);
                        break;              
            }
            
        }
        //输出数据 查询数据
        public static void Export(string input)
        {
            foreach (var item in Input.Studens)
            {
                Console.WriteLine(item);
            }
            


        }
        public static void gotoMenu()
        {
           
            if (Console.ReadLine()=="Y"||Console.ReadLine()=="y")
            {
                return;
            }
            else
            {
                surface_chart.SceneSelectionMenu();
            }
        }
        


    }
}
